#ifndef APPLYOPDIALOG_H
#define APPLYOPDIALOG_H

#include "../../detiq-t/GenericInterface/Other/ParamRep.h"
#include "../../detiq-t/GenericInterface/Widgets/ImageWidgets/ImageWindow.h"
#include "../../detiq-t/GenericInterface/Widgets/ImageWidgets/DoubleImageWindow.h"
#include "../../detiq-t/GenericInterface/Widgets/ImageWidgets/StandardImageWindow.h"
#include <QDialog>

using namespace imagein;
using namespace genericinterface;

namespace Ui {
class ApplyOpDialog;
}

class ApplyOpDialog : public QDialog
{
    Q_OBJECT
    
public:
    explicit ApplyOpDialog(QWidget *parent = 0, const ImageWindow *from = NULL);
    ~ApplyOpDialog();
    ParamRep * getParam();

    enum OPER{RIEN,CUT,ABS,NORM};
    enum ROW{MIN=0,MEAN,MAX,STDDEV};
    enum COLUMN{RED=0,GREEN,BLUE};
    
private:
    Ui::ApplyOpDialog *ui;

protected:
    void init(const ImageWindow *from);
    void initInfo(const ImageWindow *from);
    ParamRep::StandardOp getOp();
    ParamRep::ValRound getRound();
    double _maxabs;
    double _max;
    double _min;
    void getBefCenter();

public slots:
    void ManageButton();
    void CheckCut();
    void CheckStretch();
};

#endif // APPLYOPDIALOG_H
